package com.kangyi.user.mapper;

import com.kangyi.user.annotation.AutoFill;
import com.kangyi.entity.HealthInfo;
import com.kangyi.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author Blank
 * @version 1.0
 */
@Mapper
public interface HealthInfoMapper {


    @Insert("insert into health_info(guest_id, weight, height, create_time, update_time, create_user, update_user) " +
            "VALUES (#{guestId},#{weight},#{height},#{createTime},#{updateTime},#{createUser},#{updateUser})")
    @AutoFill(value = OperationType.INSERT)
    void addHealthInfo(HealthInfo healthInfo);

    @Delete("delete from health_info where guest_id = #{guestId}")
    void deleteHealthInfo(Integer guestId);

    @AutoFill(value = OperationType.UPDATE)
    void updateHealthInfo(HealthInfo healthInfo);
}
